
#include <vector>

#define 2DArray(x) vector<vector<x > > 

using std::vector;

template <class T>
class ODN_SectorSystem 
{
	
	
	void Clear(); 
	
	void Resize(Vector3D Size); 
	
	SectorContents getNearbyContents(Vector3D Pos, Vector3D Size); 
	
	void addItem(T Item, Vector3D Pos, Vector3D Size); 
	
private:
	
	//Size and number of sectors 
	Vector3D sectorsize;
	Vector3D sectorcount;
	
	typedef vector<T> SectorContents; 
	
	//2D array of sector contents 
	2DArray(SectorContents) sectors; 
	
};


class RTTIBase
{
	
public:
	
	typedef string IDType;
	
	//Returns true if the object has been derived from the identified base class 
	//TODO: Check if this should be a string 
	bool IsA(IDType ID)
	{
		
		for (int i=0;i<familytree.size();i++) {
			
			if (familytree[i] == ID)
				return true;
			
		}
		
		return false; 
		
	}
	
protected:
	
	setObjectID()
	{
		
		familytree.push_back(getObjectID);
		
	}
	
	vector<IDType> familytree; 
	
	virtual IDType getObjectID()		{ return "RTTI Baseclass"; ) 
	
private:
	
	
	
};

class Object : public RTTIBase 
{
	
public:
	
	Object()		{ setObjectID(); } 
	
	
protected:
	
	virtual IDType getObjectID()		{ return "Object "; } 
	
private:
	
	
}

